package liuyuyang.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import liuyuyang.domain.User;
import liuyuyang.domain.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {
    @Select("select u.* from sys_user_role ur, sys_role r, tb_user u where ur.user_id = u.u_id and ur.role_id = r.id and ur.role_id = #{id}")
    public List<User> getUserRoleList(Integer id);
}
